Skip to content

types: add temperature threshold feature TMPTHH field#1007

Merged
igaw merged 2 commits intolinux-nvme:masterfrom
ikegami-t:temp-thresh-hyst
May 7, 2025
Merged

types: add temperature threshold feature TMPTHH field#1007
igaw merged 2 commits intolinux-nvme:masterfrom
ikegami-t:temp-thresh-hyst

Conversation

@ikegami-t
Copy link
Copy Markdown
Contributor

The field supported by NVMe revision 2.1.

Comment thread src/nvme/ioctl.h Outdated
*/
int nvme_set_features_temp_thresh(int fd, __u16 tmpth, __u8 tmpsel,
enum nvme_feat_tmpthresh_thsel thsel,
enum nvme_feat_tmpthresh_thsel thsel, __u8 tmpthh,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, this breaks the API.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I will do add a version 2 API instead. Thank you.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, there is no other way :(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added version 2 APIs instead. Thank you.

@ikegami-t ikegami-t force-pushed the temp-thresh-hyst branch from 8cd68b8 to 73e228c Compare May 7, 2025 14:42
Comment thread src/nvme/util.h Outdated
*thsel = NVME_FEAT_TT_THSEL(value);
}

static inline void nvme_feature_decode_temp_threshold2(__u32 value, __u16 *tmpth,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the static inline function it is not necessary to introduce a new function. Just update the existing. We don't guarantee on source code level backwards compatibility. Just on binary interface.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood so updated the patch again. Thank you.

@ikegami-t ikegami-t force-pushed the temp-thresh-hyst branch from 73e228c to 3259657 Compare May 7, 2025 16:16
ikegami-t added 2 commits May 7, 2025 18:53
The field supported by NVMe revision 2.1.

Signed-off-by: Tokunori Ikegami <[email protected]>
Those required to get the feature temperature values.

Signed-off-by: Tokunori Ikegami <[email protected]>
@igaw igaw force-pushed the temp-thresh-hyst branch from 3259657 to cad1f2b Compare May 7, 2025 16:54
@igaw
Copy link
Copy Markdown
Collaborator

igaw commented May 7, 2025

Thanks!

I've updated the export file and also renamed back the inline function. No need to change the name there.

@igaw igaw merged commit 1302510 into linux-nvme:master May 7, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants